/**
 * @name 管理系统路由配置
 * @description 包含权限控制的路由配置，支持RBAC权限管理
 */
export default [
  {
    path: '/user',
    layout: false,
    routes: [
      {
        name: 'login',
        path: '/user/login',
        component: './user/login',
      },
    ],
  },
  {
    path: '/dashboard',
    name: 'dashboard',
    icon: 'dashboard',
    component: './Dashboard',
    access: 'canViewDashboard',
  },
  {
    path: '/system',
    name: 'menu.system',
    icon: 'setting',
    access: 'canManageSystem',
    routes: [
      {
        path: '/system/users',
        name: 'menu.system.users',
        icon: 'user',
        component: './Users',
        access: 'canViewUsers',
      },
      {
        path: '/system/roles',
        name: 'menu.system.roles',
        icon: 'team',
        component: './Roles',
        access: 'canViewRoles',
      },
      {
        path: '/system/permissions',
        name: 'menu.system.permissions',
        icon: 'safety',
        component: './Permissions',
        access: 'canViewPermissions',
      },
      {
        path: '/system/settings',
        name: 'menu.settings',
        icon: 'setting',
        component: './Settings',
        access: 'canViewSettings',
      },
    ],
  },
  {
    path: '/',
    redirect: '/dashboard',
  },
  {
    component: '404',
    layout: false,
    path: './*',
  },
];
